<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header');?>
<style>
.clicktrue{cursor:pointer;}
.clicktrue:hover{background:#aaa;cursor:pointer;}
</style>
<form name="myform" action="?m=sgw_jizi&c=sgw_jizi&a=listorder" method="post">
<div class="pad-lr-10">
<div class="table-list">
    <table width="100%" cellspacing="0">
        <thead>
            <tr>
            <th width="80">排序</th>
            <th width="80">ID</th>
            <th width="300">名称</th>
            <th width="300">新窗口展开</th>
            <th>英文名称</th>
            <th>数据操作</th>
			<th>集子操作</th>
            </tr>
        </thead>
	<tbody>
    <?php echo $categorys;?>
	</tbody>
    </table>
</div>
</div>
</div>
    <div class="btn">
    	<input type="hidden" name="dosubmit" id="" value="dosubmit">
    	<input type="submit" class="button" name="dosubmit" value="<?php echo L('listorder')?>" /></div>
</form>
<script type="text/javascript">
var mytrs = $(".mytr");
$(function(){
	mytrs.each(function(i){
			if($(this).attr('pid')!='0'&&$(this).attr('pid')!='1'&&$(this).attr('pid')!='<?=$_GET['list_pid']?>'){
				$(this).hide();
				$(this).attr('hid','1');
			}
		});
	$(".clicktrue").click(function(){
		var pid = $(this).parent().attr('sid');
		var dis = $(this).parent().next().attr('hid');
		if(dis == '1'){
			open(pid);
		}else{
			close(pid);
		}
	});
	function close(pid){
		mytrs.each(function(i){
			if($(this).attr('pid')==pid){
				$(this).attr('hid','1');
				$(this).hide('fast');
				close($(this).attr('sid'));
			}
		});
	}
	function open(pid){
		mytrs.each(function(i){
			if($(this).attr('pid')==pid){
				$(this).attr('hid','0');
				$(this).show('fast');
			}
		});
	}
});
</script>
</body>
</html>